program QW;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Pathfinding in 'Pathfinding.pas',
  __include in '__include.pas';

var
  i, j : Integer;
  map : Pmap;
  depart, arrive : t_coord;
  calculate_path : TPathfinding;

begin
  { TODO -oUser -cConsole Main : Insert code here }
  New(map);
  SetLength(map.environnement, 201, 201);
  for i := 1 to 200 do
    begin
      for j := 1 to 200 do
        begin
           map.environnement[i, j] := true;
        end;
    end;

    for i := 50 to 100 do
    begin
      for j := 1 to 100 do
        begin
           map.environnement[i, j] := false;
        end;
    end;
      
  map.longueur := 200;
  map.largeur := 200;

  depart.x := 2;
  depart.y := 2;

  arrive.x := 158;
  arrive.y := 28;

  calculate_path := TPathfinding.Create(depart, arrive, map);
  calculate_path.main();
  readln;
  readln;
end.
